<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class EstateCommunity extends Model
{
    public $timestamps = false;
    protected $connection = 'mysql_center';
    protected $table = 'electric_community';

    public  function platform_agent(){
        return $this->hasOne(ElectricPlatformAgent::class, 'id','agent_id');
    }
    public  function SysRegionProvince(){
        return $this->hasOne(SysRegion::class, 'id','province');
    }
    public  function SysRegionCity(){
        return $this->hasOne(SysRegion::class, 'id','city');
    }
    public  function SysRegionCounty(){
        return $this->hasOne(SysRegion::class, 'id','county');
    }
    public  function ElectricElectricity(){
        return $this->hasOne(ElectricElectricity::class, 'community','id');
    }

}
